
const { ccclass, property, menu } = cc._decorator;

@ccclass
@menu("ipha组件/简单旋转")
export default class Ipha_Rotation extends cc.Component {

    @property({ displayName: "旋转速度" })
    private rotationSpeed: number = 10;

    @property({ displayName: "旋转方向", tooltip: "1 or -1" })
    private dir: number = 1;

    // onLoad () {}

    start() {
        cc.tween(this.node)
            .by(0.1, { angle: this.rotationSpeed * this.dir })
            .repeatForever()
            .start();
    }

    // update (dt) {}
}
